cmake_minimum_required(VERSION 3.21 FATAL_ERROR)

project(VirtuaNES)

add_executable(VirtuaNES WIN32
    NES/ApuEX/emu2413/2413tone.h
    NES/ApuEX/emu2413/emu2413.c
    NES/ApuEX/emu2413/emu2413.h
    NES/ApuEX/emu2413/vrc7tone.h
    NES/ApuEX/APU_FDS.cpp
    NES/ApuEX/APU_FDS.h
    NES/ApuEX/APU_FME7.cpp
    NES/ApuEX/APU_FME7.h
    NES/ApuEX/APU_INTERFACE.h
    NES/ApuEX/APU_INTERNAL.cpp
    NES/ApuEX/APU_INTERNAL.h
    NES/ApuEX/APU_MMC5.cpp
    NES/ApuEX/APU_MMC5.h
    NES/ApuEX/APU_N106.cpp
    NES/ApuEX/APU_N106.h
    NES/ApuEX/APU_VRC6.cpp
    NES/ApuEX/APU_VRC6.h
    NES/ApuEX/APU_VRC7.cpp
    NES/ApuEX/APU_VRC7.h
    NES/Mapper/Mapper.cpp
    NES/Mapper/Mapper.h
    NES/Mapper/MapperFactory.cpp
    NES/APU.cpp
    NES/APU.h
    NES/Cheat.h
    NES/Cpu.cpp
    NES/CPU.h
    NES/IPS.cpp
    NES/IPS.h
    NES/MMU.cpp
    NES/MMU.h
    NES/Nes.cpp
    NES/Nes.h
    NES/PAD.cpp
    NES/PAD.h
    NES/PPU.cpp
    NES/PPU.h
    NES/ROM.cpp
    NES/ROM.h
    NES/ROMDB.cpp
    NES/ROMDB.h
    NES/State.h
    NES/VS_Setting.h
    NES/VsUnisystem.cpp
    NES/VsUnisystem.h
    res/VirtuaNES.exe.manifest
    zlib/adler32.c
    zlib/compress.c
    zlib/crc32.c
    zlib/crc32.h
    zlib/deflate.c
    zlib/deflate.h
    zlib/gzclose.c
    zlib/gzguts.h
    zlib/gzlib.c
    zlib/gzread.c
    zlib/gzwrite.c
    zlib/infback.c
    zlib/inffast.c
    zlib/inffast.h
    zlib/inffixed.h
    zlib/inflate.c
    zlib/inflate.h
    zlib/inftrees.c
    zlib/inftrees.h
    zlib/ioapi.c
    zlib/ioapi.h
    zlib/trees.c
    zlib/trees.h
    zlib/uncompr.c
    zlib/unzip.c
    zlib/unzip.h
    zlib/zconf.h
    zlib/zlib.h
    zlib/zutil.c
    zlib/zutil.h
    AboutDlg.cpp
    AboutDlg.h
    App.cpp
    App.h
    Archive.cpp
    Archive.h
    AviConvDlg.cpp
    AviConvDlg.h
    AviWriter.cpp
    AviWriter.h
    ChatDlg.cpp
    ChatDlg.h
    CheatDlg.cpp
    CheatDlg.h
    CHyperLink.h
    Com.cpp
    Com.h
    Config.cpp
    Config.h
    ControllerDlg.cpp
    ControllerDlg.h
    Crclib.cpp
    Crclib.h
    DatachBarcodeDlg.cpp
    DatachBarcodeDlg.h
    DebugOut.cpp
    DebugOut.h
    DipSwitchDlg.cpp
    DipSwitchDlg.h
    DirectDraw.cpp
    DirectDraw.h
    DirectInput.cpp
    DirectInput.h
    DirectSound.cpp
    DirectSound.h
    dxguid.c
    EmulatorDlg.cpp
    EmulatorDlg.h
    EmuThread.cpp
    EmuThread.h
    FolderDlg.cpp
    FolderDlg.h
    GameOptionDlg.cpp
    GameOptionDlg.h
    GraphicsDlg.cpp
    GraphicsDlg.h
    hq2x.h
    interp.h
    JoyAxisDlg.cpp
    JoyAxisDlg.h
    LanguageDlg.cpp
    LanguageDlg.h
    LauncherDlg.cpp
    LauncherDlg.h
    lq2x.h
    lzAscii.h
    lzSight.h
    lzTVlayer.h
    Macro.h
    MainFrame.cpp
    MainFrame.h
    MemoryView.cpp
    MemoryView.h
    MMTimer.cpp
    MMTimer.h
    MovieDlg.cpp
    MovieDlg.h
    MovieInfoDlg.cpp
    MovieInfoDlg.h
    NameTableView.cpp
    NameTableView.h
    NetPlay.cpp
    NetPlay.h
    NetPlayDlg.cpp
    NetPlayDlg.h
    nx_2xSaI.h
    nx_hq2x.h
    nx_Scale2x.h
    nx_Super2xSaI.h
    nx_SuperEagle.h
    PaletteEdit.cpp
    PaletteEdit.h
    PaletteView.cpp
    PaletteView.h
    Pathlib.cpp
    Pathlib.h
    PatternView.cpp
    PatternView.h
    Plugin.cpp
    Plugin.h
    Pngwrite.h
    Recent.cpp
    Recent.h
    Registry.cpp
    Registry.h
    Render.h
    Render16bpp.h
    Render24bpp.h
    Render32bpp.h
    Render8bpp.h
    resource.h
    RomInfoDlg.cpp
    RomInfoDlg.h
    ShortcutDlg.cpp
    ShortcutDlg.h
    SimpleVirusChecker.c
    SimpleVirusChecker.h
    SoundDlg.cpp
    SoundDlg.h
    Typedef.h
    VirtuaNES.rc
    VirtuaNESres.h
    WaveRec.cpp
    WaveRec.h
    WinMain.cpp
    Wnd.cpp
    Wnd.h
    WndHook.cpp
    WndHook.h
)
target_compile_definitions(VirtuaNES
PRIVATE
    _MBCS
)
target_include_directories(VirtuaNES
PRIVATE
    .
    NES
    NES/ApuEX
    NES/ApuEX/emu2413
    NES/Mapper
    NES/PadEX
    zlib
)
target_link_libraries(VirtuaNES
PRIVATE
    comctl32
    imm32
    winmm
)
